<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>auto</title>
		<style>
			* {
				padding: 0;
				margin: 0;
			}

			div.crim {
				width: 600px;
				height: 600px;
				/* 深红色 */
				background-color: crimson;

				/* 
					auto  = (当前浏览器窗口的宽度 - 600) / 2
				*/
				margin-left: auto;
				margin-right: auto;
			}
			
			.blue {
				margin-left: 200px;
				margin-right: 200px;
				height: 500px;
				width: auto;
				background-color: blue;
			}
			
			/*.red {
				margin-left: 200px;
				width: auto;
				margin-right: auto;
				background-color: red;
				height: 500px;
			}*/


		</style>
	</head>
	<body>

		<div class="crim"></div>

		<div class="blue"></div>

		<div class="red"></div>
		
	</body>
</html>
<!-- 
	作业见该文件所在目录的图片

 -->


